`<template>
    <div class="g_header_title">
      <div class="back" v-if="$route.name !== 'welcome' "  @click="goBack"></div>
      <div class="title">{{title}}</div>
    </div>
</template>

<script>

export default {
  props: ['title'],
  data() {
    return {
    };
  },
  methods: {
    goBack() {
      this.$router.back()
    }
  }
};
</script>


<style lang="scss" scoped>
.g_header_title {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 500px;
  z-index: 100;
  background: #000;
  height: 60px;
  font-weight: 500;
  line-height: 60px;
  font-size: 18px;
  font-weight: 520;
  letter-spacing: 2px;
  color: #fff;
  padding: 0 10px;
  display: flex;
}
.back {
  position: absolute;
  width: 18px;
  margin-top: 21px;
  margin-left: 10px;
  height: 18px;
  background-image: url("../assets/images/back.png");
  background-size: cover;
  background-repeat: no-repeat;
}
.title {
  width: 100%;
  text-align: center;
}
</style>
